package com.m3839.sdk.pay.platform.alipay;

import android.text.TextUtils;

import java.util.Map;

/**
 * Description:阿里支付结果实体类
 *
 * @author 陈宝阳
 * @create 2020/8/13 09:42
 */
public class AliPayResult {

  private String resultStatus;
  private String result;
  private String memo;

  public AliPayResult(Map<String, String> rawResult) {
    if (rawResult == null) {
      return;
    }

    for (String key : rawResult.keySet()) {
      if (TextUtils.equals(key, "resultStatus")) {
        resultStatus = rawResult.get(key);
      } else if (TextUtils.equals(key, "result")) {
        result = rawResult.get(key);
      } else if (TextUtils.equals(key, "memo")) {
        memo = rawResult.get(key);
      }
    }
  }

  @Override
  public String toString() {
    return "resultStatus={" + resultStatus + "};memo={" + memo
        + "};result={" + result + "}";
  }

  /**
   * @return the resultStatus
   */
  public String getResultStatus() {
    return resultStatus;
  }

  /**
   * @return the memo
   */
  public String getMemo() {
    return memo;
  }

  /**
   * @return the result
   */
  public String getResult() {
    return result;
  }
}
